package com.example.demo.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

@Component
public class StringRedisUtil {

    @Autowired
    private StringRedisTemplate redisTemplate;

    /**
     * 保存数据
     *
     * @param key
     * @param value
     */
    public void setValue(String key, String value){
        redisTemplate.opsForValue().set(key, value);




    }


}
